home *** CD-ROM | disk | FTP | other *** search
/ Top 200 Programs / Top 200 Programs.iso / Bob8 / THOMPSON / LIBERTY / PRODUCT / TUTORIAL.EXE / WK4PROG5.BAS < prev    next >
BASIC Source File  |  1996-02-28  |  908b  |  34 lines

  1.  
  2.     'WK4PROG5.BAS
  3.     'open a window with a button, a textbox, and a statictext
  4.     'the window is sized at 300 by 100 at position 200, 150
  5.     WindowWidth = 300
  6.     WindowHeight = 100
  7.     UpperLeftX = 200
  8.     UpperLeftY = 150
  9.     button #myFirst.ok, "OK!", [okClicked], UL, 220, 35
  10.     textbox #myFirst.field, 10, 35, 200, 25
  11.     statictext #myFirst.label, "Type some text here.", 10, 10, 150, 25
  12.     open "myname's first window!" for window as #myFirst
  13.  
  14.     'now stop and wait
  15.     input aVar$
  16.     goto [quit]
  17.  
  18. [okClicked]  'OK! was clicked.  Get the contents of the entry field
  19.  
  20.     'print a command to the textbox
  21.     print #myFirst.field, "!contents?"
  22.     'now get the contents from the textbox
  23.     input #myFirst.field, aString$
  24.  
  25.     'now pop up a notice saying what was in the textbox
  26.     notice aString$
  27.  
  28. [quit]
  29.     'now close the window
  30.     close #myFirst
  31.  
  32.     end
  33.  
  34.